Fix warning with event compression on a destroyed window
authorOwen W. Taylor <otaylor@fishsoup.net>
Mon, 11 Nov 2013 23:17:38 +0000 (18:17 -0500)
committerOwen W. Taylor <otaylor@fishsoup.net>
Mon, 11 Nov 2013 23:20:09 +0000 (18:20 -0500)
Fix a critical message when we try to compress events for a window
that was already destroyed.

gdk/gdkevents.c

index 6d926aef2c98019c29b767d0ed32611492a74809..83c313cd3442196bc5ddefd83257ac8643b18c73 100644 (file)
@@ -316,7 +316,8 @@ _gdk_event_queue_handle_motion_compression (GdkDisplay *display)
       pending_motions == display->queued_tail)
     {
       GdkFrameClock *clock = gdk_window_get_frame_clock (pending_motion_window);
-      gdk_frame_clock_request_phase (clock, GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS);
+      if (clock) /* might be NULL if window was destroyed */
+       gdk_frame_clock_request_phase (clock, GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS);
     }
 }